package IOFlow.IOFlowSerializeTheStream;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.ObjectInputStream;

public class ObjectOutputStreamB {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
        /*
        方序列化流:
            将序列化的对象读到程序当中

            构造方法:
                public ObjectInputStream(InputStream out) 将基本流变成高级流

            成员方法:
                public object readObject()  把序列化到本地的文件，读取到程序当中
         */
        ObjectInputStream ois=new ObjectInputStream(new FileInputStream("JavaCase\\Test"));

        Student stu=(Student)ois.readObject();
        //打印对象
        System.out.println(stu);
    }
}
